package com.daxia.ogmall.dto;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.daxia.ogmall.common.DesignerOrderType;
import com.daxia.ogmall.model.Designer;

public class DesignerDTO extends Designer {
	private List<String> images;
	/**
	 * 纬度
	 */
	private Double latitude;
	/**
	 * 经度
	 */
	private Double longitude;
	/**
	 * 城市id组成的str 
	 */
	private String cityIdArr;
	/**
	 * 判断是不是管理员
	 */
	private boolean isAdmin;
	
	private String searchTerm;
	private String mobile;
	/**
	 * 排序规则
	 */
	private DesignerOrderType orderType;
	

	public DesignerOrderType getOrderType() {
		return orderType;
	}

	public void setOrderType(DesignerOrderType orderType) {
		this.orderType = orderType;
	}

	public List<String> getImages() {
		if (StringUtils.isBlank(getTopDesignerImage())) {
			return new ArrayList<String>();
		}
		String[] arr = getTopDesignerImage().split(",");
		images = new ArrayList<String>();
		for (String string : arr) {
			images.add(string);
			
		}
		return images;
	}

	public void setImages(List<String> images) {
		this.images = images;
	}

	public Double getLatitude() {
		if (getUser() != null) {
			getUser().getLatitude();
		}
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public Double getLongitude() {
		if (getUser() != null) {
			return getUser().getLongitude();
		}
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public String getCityIdArr() {
		return cityIdArr;
	}

	public void setCityIdArr(String cityIdArr) {
		this.cityIdArr = cityIdArr;
	}

	public boolean isAdmin() {
		return isAdmin;
	}

	public void setAdmin(boolean isAdmin) {
		this.isAdmin = isAdmin;
	}

	public String getSearchTerm() {
		return searchTerm;
	}

	public void setSearchTerm(String searchTerm) {
		this.searchTerm = searchTerm;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	
}
